package com.shopx.auth.service;

import com.shopx.auth.bean.SysRole;
import com.shopx.auth.model.SysRoleModel;
import com.shopx.base.exception.ShopxException;
import com.shopx.cmm.DTO.PageDTO;

import java.util.List;

/**
 * @author lituo
 * @className: ISysRoleService
 * @description: 角色
 * @date 2021/12/5 10:42 AM
 */
public interface ISysRoleService {

  /**
   * 新增记录
   *
   * @return int
   * @author lituo
   * @date 3:17 PM 2021/12/5
   * @param  sysRole
   */
  int insertSelective(SysRoleModel sysRole) throws ShopxException;

  /**
   * 删除记录
   *
   * @return int
   * @author lituo
   * @date 3:17 PM 2021/12/5
   * @param  sysRole
   */
  int deleteByPrimaryKey(SysRole sysRole) throws ShopxException;

  /**
   * 批量删除
   * @param list
   * @throws ShopxException
   */
  void deleteBatch(List<SysRole> list) throws ShopxException;

  /**
   * 查询明细记录
   *
   * @return com.shopx.auth.model.SysRoleModel
   * @author lituo
   * @date 3:17 PM 2021/12/5
   * @param  sysRole
   */
  SysRoleModel selectByPrimaryKey(SysRole sysRole) throws ShopxException;

  /**
    * 根据code查询角色
    * @author lituo
    * @date 10:17 AM 2022/1/22
    * @param	sysRole
    * @return com.shopx.auth.bean.SysRole
    */
  SysRole selectByRoleCode(SysRole sysRole);

  /**
   * 修改记录
   *
   * @return void
   * @author lituo
   * @date 3:17 PM 2021/12/5
   * @param  sysRole
   */
  void updateByPrimaryKeySelective(SysRoleModel sysRole) throws ShopxException;

  /**
   * 分页查询
   *
   * @return com.shopx.cmm.dto.PageDTO<com.shopx.auth.model.SysRoleModel>
   * @author lituo
   * @date 3:17 PM 2021/12/5
   * @param  sysRoleModel
   */
  PageDTO<SysRoleModel> getListPage(SysRoleModel sysRoleModel) throws ShopxException;

  /**
   * 查询编辑角色清单
   * @param sysRoleModel
   * @return
   * @throws ShopxException
   */
  List<SysRoleModel> queryEditList(SysRoleModel sysRoleModel) throws ShopxException;


  /**
    * 查询角色列表
    * @author lituo
    * @date 3:11 PM 2022/2/4
    * @param	sysRoleModel
    * @return java.util.List<com.shopx.auth.model.SysRoleModel>
    */
  List<SysRoleModel> queryList(SysRoleModel sysRoleModel);

  /**
   * 查询角色匹配的菜单
   *
   * @return java.lang.String
   * @author lituo
   * @date 3:17 PM 2021/12/5
   * @param  sysRole
   */
  String queryMatchUrl(SysRole sysRole) throws ShopxException;

}

